/**
 * Site
 */

.site {
	box-sizing: border-box;
	display: flex;
	flex: 1 0 auto;
	justify-content: space-between;
	padding: 0;
	position: relative;

	&.is-loading {
		.site-icon {
			animation: pulse-light 0.8s ease-in-out infinite;
		}

		.site__title,
		.site__domain {
			animation: pulse-light 0.8s ease-in-out infinite;
			background-color: lighten( $gray, 30% );
			color: transparent;
			width: 95%;

			&::after {
				display: none;
			}
		}

		.notouch .sites-popover &:hover {
			.site__title,
			.site__domain {
				color: transparent;
			}
		}

	}

	&.is-compact {
		.site__content {
			padding: 0 16px;
		}

		.site__domain {
			display: none;
		}

		.site__title {
			line-height: 46px;
		}

		.site__home {
			top: 11px;
			line-height: 18px;
		}

		.site__home .gridicon {
			margin-top: 0;
		}

	}
}

// Wraps the anchor element
.site__content {
	display: flex;
	justify-content: space-between;
	overflow: hidden;
	padding: 16px;
	position: relative;
	width: 100%;

	&:focus {
		outline: none;
	}
}

// Adjusts the SiteIcon component for use
// within a Site item
.site .site-icon {
	position: relative;
	height: 30px;
	width: 30px;
	overflow: hidden;
	align-self: center;
	margin-right: 8px;
}

// The group of site title and domain
.site__info {
	width: 0; // Firefox needs explicit width (even 0)
	flex: 1 0 auto;
}

.site__title {
	color: $gray-dark;
	display: block;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

.site__domain {
	color: $gray-text-min;
	display: block;
	max-width: 95%;
	font-size: 11px;
	line-height: 1.4;
}

.site__title,
.site__domain {
	overflow: hidden;
	white-space: nowrap;
	&::after {
		@include long-content-fade();
	}
}

.site__home {
	background: $blue-medium;
	color: $white;
	display: block;
	width: 32px;
	height: 32px;
	text-align: center;
	text-transform: none;
	overflow: initial;
	opacity: 0;
	transition: opacity 0.2s;
	transform: translate3d(0, 0, 0);
	position: absolute;
		left: 16px;
		top: 17px;

	.gridicon {
		margin-top: 5px;
		vertical-align: middle;
	}

	.site.is-compact & {
		width: 24px;
		height: 24px;
	}

	&:hover {
		color: $white;
	}

	@include breakpoint( "<660px" ) {
		display: none;
	}
}

.site__content:hover .site__home {
	opacity: 1;
}

.site__badge {
	color: $gray;
	padding-right: 4px;
	line-height: 0;
	position: relative;
	vertical-align: middle;
}
